import request from '../utils/request';
// import { useTokenStore } from '../stores/token';
// 选课表

export const getScService = (pageData) => {
    return request.get('/class/list',{params:pageData})
}
//根据学生id查询课程
export const getScByStudentIdService = (stuId) => {
    return request.get('/class/'+stuId)
}
//根据课程id查询学生
export const getStuByClassIdService = (couId) => {
    return request.get('/class/course/'+couId)
}

export const getByIdService = (id) => {
    return request.get('/class?id='+id)
}
export const addScService = (data) => {
    return request.post('/class/add', data)
}

export const deleteScService = (id) => {
    return request.delete('/class/'+id)
}
//根据课程id和学生id删除
export const deleteScByStuIdService = (stuId,couId) => {
    return request.delete('/class/'+stuId+'/'+couId)
}
// 课程数据修改
export const updateService = (data) => {
    return request.put('/class/update', data)
}